<?php
/*
 * Created on Oct 24, 2009
* @author allen
*/
//    session_start();
//	session_cache_expire(30);
include_once(dirname(__FILE__).'/../database/Shift.php');
include_once(dirname(__FILE__).'/../database/dbShifts.php');
include_once(dirname(__FILE__).'/../editShift.php?shift=02-19-10-15-18');
include_once(dirname(__FILE__).'/../editShift.inc');
class testeditShift extends UnitTestCase {
	function testeditShiftModule() {
		// put a shift into the database
		$s1=new Shift("02-19-10-15-18",3, null, "", "");
		$this->assertTrue(insert_dbShifts($s1));
		$myshift = select_dbShifts("02-19-10-15-18");
		 
		// test generate sub call list/view sub call list button
		 
		// test clear shift button
		$this->assertTrue(process_clear_shift(array('_submit_clear_shift'=>true), $myshift, ""));
		// test assign volunteer button
		$this->assertTrue(process_add_volunteer(
				array('_submit_add_volunteer'=>true,
						'all_vol'=>"0",
						'scheduled_vol'=>'rob2077291234+rob+jones'),
				$myshift, ""));
		/*
		 // test add slot button
		//$this->assertTrue(process_add_slot(array('_submit_add_slot'=>true), $myshift, ""));
		// test ignore vacancy button
		//$this->assertTrue(process_ignore_slot(array('_submit_ignore_vacancy'=>true), $myshift, ""));
		// test assign volunteer button
		//$this->assertTrue(process_add_volunteer(
				//      array('_submit_add_volunteer'=>true,
						//            'all_vol'=>"0",
						//            'scheduled_vol'=>'jon2077291234+jon+jones'),
				//     $myshift, ""));
		// test remove person/create vacancy button
		$this->assertTrue(process_unfill_shift(array('_submit_filled_slot_0'=>true), $myshift, ""));
		$myshift = select_dbShifts("02-19-10-3-6");
		print_r($myshift);
		*/
		echo ("testeditShift complete");
	}
}

?>
